package cn.demoncat.util.hazelcast.config;

import java.util.ArrayList;
import java.util.List;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * Hazelcast 配置属性
 * 
 * @author 延晓磊
 *
 * @since 2020年1月2日
 */
@Component
@ConfigurationProperties(prefix = "demoncat.hazelcast")
public class HzProperties {

	// Hazelcast 分组名称（集群隔离）
	private String group = "demoncat";
	// Hazelcast 实例名称
	private String instance = "demoncat-hazelcast";

	// Hazelcast 服务端-组播端口：默认5701（5700-5800）
	private Integer port = 5701;
	// Hazelcast 服务端-MAP配置：名称前缀:备份数（默认1）:是否读取备份（默认1，0否）
	private List<String> maps = new ArrayList<>();
	// Hazelcast 服务端-QUEUE配置：名称前缀:备份数（默认1）
	private List<String> queues = new ArrayList<>();
	// Hazelcast 服务端-List配置：名称前缀:备份数（默认1）
	private List<String> lists = new ArrayList<>();
	// Hazelcast 服务端-Set配置：名称前缀:备份数（默认1）
	private List<String> sets = new ArrayList<>();

	public String getGroup() {
		return group;
	}

	public void setGroup(String group) {
		this.group = group;
	}

	public String getInstance() {
		return instance;
	}

	public void setInstance(String instance) {
		this.instance = instance;
	}

	public Integer getPort() {
		return port;
	}

	public void setPort(Integer port) {
		this.port = port;
	}

	public List<String> getMaps() {
		return maps;
	}

	public void setMaps(List<String> maps) {
		this.maps = maps;
	}

	public List<String> getQueues() {
		return queues;
	}

	public void setQueues(List<String> queues) {
		this.queues = queues;
	}

	public List<String> getLists() {
		return lists;
	}

	public void setLists(List<String> lists) {
		this.lists = lists;
	}

	public List<String> getSets() {
		return sets;
	}

	public void setSets(List<String> sets) {
		this.sets = sets;
	}

}
